<?php
require_once("xforms/Core.php");

class XForms_help extends XForms_Core {
  protected $tpl = '<span {renderHint} class="ui-state-default ui-corner-all" style="display:{renderDisplay}"><span class="ui-icon ui-icon-help"></span></span>';
  function renderHint() {
    return 'title="'.htmlentities($this->getValue(), ENT_QUOTES, 'utf-8').'"';
  }
  function renderDisplay(){
    return (trim($this->getValue())!="") ? "inline-block" : "none";
  }
}